Begin optimizing & fixing minor code errors