In resources.js: Packed all functions into the closure, exept initDespositis()