Added bit-bang methods, and moved clock.* and main to common