Convert @schwa's stock app to swift