Moved fn method to app.js
Worked on some tests