Cleaned out unused parts and fixed structure