fixed compile and style errors in classes