Added files and dependencies
Made code a bit neater