Cleaned up addNode class and made other formatting changes