Changed file structure and code style