Update st to 0.5 and add some patches