Database edit and classes

Edit database class so it saves the current state.
Made class for the post so everything goes trough that.
Edited paths so they are variable.