Added new function for calculating midpoint of two points. Also added a method to place a view between two other views.