Implemented static files handling
Moved options to separate file and wrote DB deinit code