Refactored Commands and Fix Buffer Overflow
Fixed conflict checking and view scope