Clear functionality added. Some inheritance also