Added clear functionality, still many issues