Implemented base logic
Fixed bad names reference