some cleanup, formatting
remove unused vars