Finally made a decent framework, good luck with implementing the rest.