A few enhancements regarding CPU performance, closes #3 and closes #4