Fixed various bugs in generic framework while testing with Lab 3