renamed files, reformatted code and added comments