WIP: cleaning up code: