changes for compilation - multiple defs, etc

added template args for heaps. Still need to define pairing and binary
heaps