Adding trends, refactoring code/file structure