Added more tests and cleaned up define type