Add basic pin interface and pin tests