Code Cleaning

Made most functions private, as there is no use in them after reading (
open() ).