Added constants and more functions (still very nowhere near done).