lots of technical changes

- admin rights now checked by middleware
- formatting in many files
- removed useless stuff