Changed the sources so that it can be compiled into a Obj-C target; added IDLE functionality (with a notification)