fix alea + debug stuff
renaming of some const
proper cast
with new const
proper handling of queue
deleting debug printf
merging