Formalizing some code notes. Temporary solutions for some issues.