Added column sorting options - fixes #6. If parent record is not queried, it tries to query child lattice and errors - part of #5.