removed user global variables
added stdout logging
some minor fix
some heroku fix
added attribute accessors instead of require_params
some changes in api controller