Upgrade dependencies
Some code cleanup

Signed-off-by: Joel Kuiper <me@joelkuiper.eu>