Cleaned up application controller