Tidied up factory code, added factory into default MVC config