updated the rest of atom.java, substituting some fast math functions in and eliminating redundant calcuations