Testing done.
Optimizations done

Pending
Exception handling.