Fixed geometry optimization and removed a lot of writing to the screen for testing. Fixed the bug where charges are calculated when printcharges=0. Fixed some other output issues. General code cleaning.