Make almost all the functionality works.