Fixed issues with memory and added CGRect support
Added TODO