Some changes in files with controller and route definitions
Changes api routes for file and moved cas library in a new directory called 'lib'.