All functions written. Debugging.