Adds mostly working functionality