consolidating into single directory and cleaned up some code