Code cleanup, comment and todo