Started main bulk of the code.