Cleaned up controller, added rest service class, local config vars added