MAIN FUNCTIONALITY COMPLETE. UNREFINED.