refactored models and controllers out of lib/ added alert css