Sketch->Library

Anyone have any tips of converting a sketch into a library or how to make a library using a sketch

Writing a Library for Arduino