Tweaks to main activity and a bit of implementaion with hardware