replaced int declarations with defines
improved documentation
removed unused methods
removed unnecessary comments
pass bathymetry by value