fixed formatting and cosmetic issues.
cosmetics.
updated entity definitions, and cleaned up some code.