Added initial functions + tests