Added XLS/CSV -> JSON import capabilities, and applied several cleanups.