Breaking Movement into multiple functions

Made mater global, private. Adding separate functions