More or less the main stuff from google code