(Lakka) Refactor more broken code