Added Comments/made it a functional script
Added comments and cleaned up the code to make it easier to read and understand
added methods to make it more of a function program