Edited and semi-working Kalman filter code.
Removed method and instead included Kalman library for Arduino from TKJ Electronics. Sort of works: values are pretty stable when sensor is tilted; values are everywhere when sensor lies flat; probably having trouble zeroing because sensor reading when flat is not 0. Try calibrating with filtered values, subtract zero from filtered values.