migration system and various changes
* removed all old database changes
* added a migration management system for the database
* added functions for adding css and js scripts into the template
* simplified various functions
* replaced the config constants DIR_WS and DIR_WS_INDEX with $GLOBALS entries