Initial unit tests and implementation of Polynomial