Lots of restructuring and beginnings of a deploy script