Added ifs, made some constants public