Refactoring

- FlashAttributes were added
- PRG pattern was implemnted
- REST functionality was started