Major code reorganization (more to be done soon), added compiler detection.