Some minor restructure for future scan implementation
I should save up for bigger commits