Move code around, outsource samples to their own files