Misc: cleanup code