Massive refactor, finished up remote inventory