Bugfixes and started working on inventory scanning