Changed file structure and added some documentation