Changes based on servernity-android's project.