added cocoapods;
small code refactoring;