physics: Fix compile errors & improve code formattng
core: Change filestreams to use std::fstream