Moved testcode to controller