Adding tests and updated prototypes