Clean up of code
Add session controller