[#258] Cleaned up code