Cleaned the main file, small changes on input and rendering