Get path refactoring

A bunch of minor bugfixes and code cleanup