Your betta fish is "glass surfing" because they see their reflection in the glass.. I had the same problem with mine, the best solution I can give you is buy some frost film (the one for windows, without adhesive) and apply it to the back, and side pains of glass. This might not be the most beautiful solution but I've found that it works well.
As for the feeding, though I'm not a Betta pro, I'd recommend to feed your betta once per day, and skip one day ever week, or every other week, this helps to avoid bloat. (unless your conditioning a breeder) you should probably feed them about 5-10 pellets or a few(3-4)medium blood worms.
Hope that helps! And best of luck