Mostly completed. Still need some testing.

Bugs might still be around. And some error-handling would be needed.