Added M_PI define. This is not in all cmath implementations.
Started work on syncing.