Moved periodic table cells into a separate class.  Also various minor cleanup and refactoring.