Added alot of codes from previous projects. More to add but for now try
to merge them in