Many improvements to core functionality