Arranging Code

Arranging code and adding more defines, setups.