fixed library functions, interrputs, added beacon stuff, too many changes to remember, I should really commit more