Fixed some issues with the code. Nothing functional yet.