Make into one file.
Fix a LOT of bugs

Signed-off-by: unknown <adacic@iaimz120.pc.uni-mainz.de>