refactoring of controllers and scalajs 0.5.4