Fixed nginx issue where it would be fatal, cleaned up ruby code to make ...

...it more readable, fixed issue on restart with appcontroller state file, removed names from source code