Added extension
Fixed up tests and lib