Added Atlas.
Compiles with C89.
Minor refactoring.