Moved some constants to relevant classes and added filtering