Implemented main data. Closes #306.