Changed classes to final and fixed the terminal command parser