Moved vision code into vision module