Added licensing headers
Fixed bias in randint. Fixed heap implementation.