Cleaned up obj-c and swift implementations