Main functionality completed.
TODO: data validation, design.