Added compare_z and compare_l methods. Adjusted command matching expression to match multiple digits and negative numbers. Added exceptions for invalid commands and invalid memory locations.