renamed files and moved code around to make everythin neater