Version 1

Completed functions.