Updating external libraries, initial changes to support orientations, code cleaning

Supporting interface orientation is still buggy