Edited the main activity and view question to remove some warnings