Added a bunch of basic functionality to the script