Added files extensions. Code improvements.