Major upd

This major update brings the following changes:
- Change directory
- Something like ORM
- Was involved smarty
- Rewrite the code is responsible for working with the database