Added constructor for the friend type; some functionality still incomplete