Implements main file