Cleaned code. Will combine sequential and parallel codebase to use single if statement.