Cleaned code of backend (model for graphics and calculus)