Minor component refactor and few bugs fixed