Very-high-energy -ray observations of pulsar wind nebulae and cataclysmic variable stars with MAGIC and development of trigger systems for IACTs