Massive overhaul to rakefile

also added accelerometer scripts