Added and integrated a queue library

Much faster (and also clearer code).
Updated compiled version and compile script