drop validateOptions require from objectstore
move database into a module to continue making the main file more readable