Changing some variables to hashes for easier usability and extensibility