Code cleanup

Cleanup of unused codes