registry

implemented registry system, did some cleaning