Make resource names more consistent.
#59: 'New folder' feature and some refactorings.

- Avoid redundant ajax calls.
- Make view template more compact.