Fix the build and cleanup rake tasks

Change-Id: I54d5885948efc146a79445b9b4451d992e2df45d