Done with main implementation.