Fixes #256 - Environment names should be alphanumeric
finished tests for environment
removed trailing spaces
Added environment test. It's green, but it lacks some tests.
realigned models to use :though and habtm when it made sense, setup basic AS controllers to support that