Added top and bottom flip transitions + extracted shared code into private method

Hope you like it!