Splitted main to 2 files