major overhaul of assignments and test entries

-centralize assigment and test entry ops in a manager class
-clean up code doc and style
-move functionality to database classes where possible