(cleanup) changes some var names and indentation