Added return values for functions. Fixed issue with pause play