Started working on Swift implementation.