Cleaned up and commented a lot of code in studyarea controller. Dynamically get base url in admin controller