well, it could definitely be designed better.
Starting from not only single-threaded but memory-limited target was... weird decision