Ported project to AndroidStudio. Code refactored and commented.