switch to 4 space style and other minor corrections
fix inconsistencies