wip: code cleaning