Attempts at improving performance. Running in release mode dramatically improves performance