Added header files and sorted out the code a bit. Check the header files for further details on what code to add in them.