clean up naming and redundant code