Restructure, prepare for clearer seperation of library code and code needing generation based on proto file