Better I/O and a big of beautification
Fixed minimal rule mode