- A lot of cleanups & bug fixes

Signed-off-by: Jack Kenrick github@jack.fr.eu.org