Changed file structure. Divided into modules