merging @kognix changes and fixing remaining requires in src