Reconfigured some function defs to pass in local variables

* --buildsite now executes
* category data structure still has problems