Moved away from visualforce pages and used restful classes