Fix formatting
Add random input generator
Fix order of linker flags