Rewrote the script in mono, resulting in less dependencies and easier portability