Further optimization and first experimentation with some different algorithms