Locked down dependencies and updated to base 4.7.
Reformatted and refactored.