Refactored codebase to ease future improvements.
Changed package list from array to actual lists.