Library modifications for android (still in progress)