initial refactoring of Open class and preprocessing functions
fix bug from intensity calculations in Grid.java