File and Code Cleanup + Database

Might wanna check if everything's still ok. If not, we can always
rollback