Refactoring origin codes, rmv unused, added new features, icons.