Changed file names and condensed code