Add layer undo command implemented
Small bug fixes