Cleaning things up a big and improving some consistency

Fixed some bugs in deploy script