got rid of cruft.
Fixed null pointer error