First stab at making imagedetection work, also moved files into different
folders.