Fix missing return values on some functions
Fix initialization of fg and bg member variables

Plus some random whitespace fixes