added is_readable check for open_file function and cleaned up code for camel case/snake case and comments