Initial commit. Detects most of the parts that are needed.