apps:rename like functionality for issue #27

I've added apps:rename like functionality in reference to issue #27, I also ran gofmt on all of the source and moved some var declarations around to increase consistency.