Fixing Issues and added fuunctionality