Refactor code and try out a new idea for android