Fixed a few issues

Signed-off-by: Samuli Seppänen <samuli.seppanen@gmail.com>
Added "rewrite in Python" to TODO

Bash just gets so messy easily...

Signed-off-by: Samuli Seppänen <samuli.seppanen@gmail.com>