Started implementing functions.